package iiet.dao;

/**
 * FeeDetailsId entity. @author MyEclipse Persistence Tools
 */

public class FeeDetailsId implements java.io.Serializable {

	// Fields

	private Student student;
	private String yearStudy;

	// Constructors

	/** default constructor */
	public FeeDetailsId() {
	}

	/** full constructor */
	public FeeDetailsId(Student student, String yearStudy) {
		this.student = student;
		this.yearStudy = yearStudy;
	}

	// Property accessors

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public String getYearStudy() {
		return this.yearStudy;
	}

	public void setYearStudy(String yearStudy) {
		this.yearStudy = yearStudy;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FeeDetailsId))
			return false;
		FeeDetailsId castOther = (FeeDetailsId) other;

		return ((this.getStudent() == castOther.getStudent()) || (this
				.getStudent() != null && castOther.getStudent() != null && this
				.getStudent().equals(castOther.getStudent())))
				&& ((this.getYearStudy() == castOther.getYearStudy()) || (this
						.getYearStudy() != null
						&& castOther.getYearStudy() != null && this
						.getYearStudy().equals(castOther.getYearStudy())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getStudent() == null ? 0 : this.getStudent().hashCode());
		result = 37 * result
				+ (getYearStudy() == null ? 0 : this.getYearStudy().hashCode());
		return result;
	}

}